#ifndef LINE_HPP
#define LINE_HPP

#include "Object.hpp"
#include <allegro.h>

/*
 * A line is defined by a point that it passes through and an angle in radians (with 0 meaning
 * upwards)
 */

class Line : public Object {
    public:
        Line() { x = y = angle = 0; };
        Line(int newx, int newy, int newangle) { x = newx; y = newy; angle = newangle; };
        int getAngle() { return angle; };
        void draw(BITMAP* screen, int color);
        void setAngle(float newangle) { angle = newangle; };
        void rotateBy(float d_angle) { angle += d_angle; };
    protected:
        float angle; // in radians
};

#endif
